Verifying Compiler Transformations for Concurrent Programs

نویسندگان

  • Sebastian Burckhardt
  • Madanlal Musuvathi
  • Vasu Singh
چکیده

Compilers transform programs, either to optimize performance orto translate language-level constructs into hardware primitives. Forconcurrent programs, ensuring that a transformation preserves thesemantics of the input program can be challenging. In particu-lar, the emitted code must correctly emulate the semantics of thelanguage-level memory model when running on hardware with arelaxed memory model.In this paper, we present a novel proof methodology for prov-ing the soundness of compiler transformations for concurrent pro-grams. Our methodology is based on a new formalization of mem-ory models as dynamic rewrite rules on event streams. We imple-ment our proof methodology in a first-of-its-kind semi-automatedtool called Traver to verify or falsify compiler transformations. Us-ing Traver, we prove or refute the soundness of several commonlyused compiler transformations for various memory models. In thisprocess, we find subtle bugs in the CLR JIT compiler and in theJSR-133 Java JIT compiler recommendations.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Verifying Optimizations for Concurrent Programs

While program correctness for compiled languages depends fundamentally on compiler correctness, compiler optimizations are not usually formally verified due to the effort involved, particularly in the presence of concurrency. In this paper, we present a framework for stating and reasoning about compiler optimizations and transformations on programs in the presence of relaxed memory models. The ...

متن کامل

Verifying Local Transformations on Relaxed Memory Models

The problem of locally transforming or translating programs without altering their semantics is central to the construction of correct compilers. For concurrent shared-memory programs this task is challenging because (1) concurrent threads can observe transformations that would be undetectable in a sequential program, and (2) contemporary multiprocessors commonly use relaxed memory models that ...

متن کامل

Towards Modularly Comparing Programs Using Automated Theorem Provers

In this paper, we present a general framework for modularly comparing two (imperative) programs that can leverage single-program verifiers based on automated theorem provers. We formalize (i) mutual summaries for comparing the summaries of two programs, and (ii) relative termination to describe conditions under which two programs relatively terminate. The two rules together allow for checking c...

متن کامل

A Cross-Language Framework for Verifying Compiler Optimizations

Most compiler correctness efforts, whether based on validation or once-and-for-all verification, are tightly tied to the particular language(s) under consideration. Proof techniques may be replicated for other targets, and parts of the compiler chain may be shared for new input or output languages, but the extent to which common elements can be generalized across multiple targets has not been f...

متن کامل

Verifying Compilers and ASMs or ASMs for uniform description of multistep transformations

A verifying compiler ensures that the compiled code is always correct but the compiler may also terminate with an error mesage and then fails to generate code. We argue that with respect to compiler correctness this is the best possible result which can be achieved in practice. Such a compiler may even include unverified code provided the results of such code can be proven correct independently...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2008